package com.cs.service;

import com.cs.mapper.PeopleMapper;
import com.cs.pojo.People;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class PeopleService {
    
    @Resource
    private PeopleMapper peopleMapper;

    @Transactional (propagation = Propagation.REQUIRES_NEW, readOnly = true)
    public People queryById(int id){
        return peopleMapper.selectByPrimaryKey(id);
    }
    
    
}
